import 'package:flutter/material.dart';
import 'package:t3_data_service/biz_data_source/map/address/poi_search/model/t3_poi_enums.dart';
import 'package:t3_data_service/biz_data_source/map/address/poi_search/poi_search.dart';
import 'package:uikit/uikit.dart';

import '../view_model/poi_search_cell_view_model.dart';

enum POIHeaderType {
  mapSelect
}

class POIListSectionHeaderModel {
  String title;
  String? imageName;

  Color titleColor = Colors.black;
  Color backgroundColor = Colors.white;
  bool needDivider = true;

  /// 右侧按钮
  String? actionTitle;
  POIHeaderType? type;

  POIListSectionHeaderModel({this.imageName, required this.title});
}

enum POIFooterType {
  enterprise,
  mapSelect
}

class POIListSectionFooterModel {
  String title;
  T3AssetsNameString? imageName;
  POIFooterType type;

  POIListSectionFooterModel({
    this.imageName,
    required this.title,
    required this.type
  });
}

/// 搜索表格UI接口模型
class POIListSection {
  List<POISearchCellViewModel> list = [];

  final T3POICategory category;

  POIListSectionHeaderModel? headerModel;
  POIListSectionFooterModel? footerModel;

  bool get hasFooter {
    return footerModel != null;
  }

  bool get hasHeader {
    return headerModel != null;
  }

  POIListSection(this.category);
}